In coarse pixel shading, a given frame or picture may have different shading rates. For example, some areas of a frame or picture may have a lower shading rate such as less than once per pixel and in another area, the shading rate may be once per pixel, and yet still in other places it may be more than once per pixel. Examples where the shading rate may be reduced include areas where there is motion and camera defocus, areas of peripheral blur and in general, any case where perceived visual detail is reduced anyway or generally where shading artifacts are less noticeable.
Coarse Pixel Shading (CPS) is a technique that can reduce shading rate in the rasterization pipeline. CPS merges blocks of quad-fragments from the same primitive into coarse shading quads. For example the number of shading evaluations can be reduced to 25% by merging a block of 4×4 fragments (4 quads) into a single shading quad (2×2 coarse fragments).
Coarse pixel shading reduces shading costs after rasterizing a triangle. However, some factors may limit the efficacy of coarse pixel shading because redundant pixel shading executions may be generated. This efficacy limitation may occur for example in connection with scene depth complexity, partially covered pixels and quad fragment-based scheduling of pixel shaders for finite differencing.
It often happens that pixels covered by the same surface are shaded multiple times as they are covered by quad fragments of multiple rasterized primitives. This is because coarse pixel shading works only within a single rasterized primitive. CPS uses triangles that generate several fragments by themselves. However, modern rendering workloads often feature small triangles where the benefits of CPS get amortized.